package com.mall.biz.trade;

import javax.servlet.http.HttpServletRequest;

import com.mall.dto.TradePriceAndBuyCountDTO;
import com.mall.pojo.Trade;

/**
 * 订单的业务逻辑接口
 * @author haiyang
 *
 */
public interface O2OTradeBiz {

	/**
	 * 价格信息的组装
	 * @param request
	 * @param type
	 * @param price
	 * @param buyCount
	 * @param parentId
	 * @return
	 */
	TradePriceAndBuyCountDTO pack4PirceAndBuyCount(HttpServletRequest request,Integer type,Long price,Integer buyCount,Long parentId );
	
	/**
	 * 成功插入后
	 * @return
	 */
	Boolean afterSuccInsert(HttpServletRequest request,Trade trade);
	
	/**
	 * 插入失败后
	 * @return
	 */
	Boolean afterErrorInsert(HttpServletRequest request,Trade trade);
	/**
	 * 插入前
	 * @return
	 */
	Boolean beforeInsert(HttpServletRequest request,Trade trade);
}
